package com.onec.service.mybatis.uitil;

import org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory;

public class ProxyFactoryExample {


  private static class Order {

    private String userName;
    private String goodName;


    public Order(String userName, String goodName) {
      this.userName = userName;
      this.goodName = goodName;
    }

    public String getUserName() {
      return userName;
    }

    public void setUserName(String userName) {
      this.userName = userName;
    }

    public String getGoodName() {
      return goodName;
    }

    public void setGoodName(String goodName) {
      this.goodName = goodName;
    }
  }


  public void testProxyFactory() {

    JavassistProxyFactory proxyFactory = new JavassistProxyFactory();
    Order order = new Order("", "");

    // 创建代理对象
    //ObjectFactory objectFactory = new DefaultObjectFactory();
    //Object o = proxyFactory.createProxy(order, ResultLoaderMap.class)
  }
}
